package com.lanou.pianke.common.utils;

import java.util.Random;

public class RandomString {

    private static String range = "0123456789abcdefghijklmnopqrstuvwxyz";

    public static String getRandomString(){

          Random random = new Random();

          StringBuffer result = new StringBuffer();
        //要生成几位，就把这里的数字改成几
         for ( int i = 0; i < 20; i++ ){

result.append( range.charAt( random.nextInt( range.length() ) ) );

}

 return result.toString();
 }

}
